package com.example.demotest.mapper;

import com.example.demotest.javaBean.dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @Auther:lele
 * @Date:2025/4/1
 */
@Mapper
public interface DeptMapper {

    @Select("select * from dept")
    List<dept> selectAllDao();

    @Delete("delete from dept where id=#{id}")
    void delDao(Integer id);

    @Insert("insert into dept values(null,#{name},#{createTime},#{updateTime})")
    void addDao(dept dept);

    @Select("select * from dept where id=#{id}")
    dept getDao(Integer id);

    @Update("update dept set name=#{name},update_time=#{updateTime} where id=#{id}")
     void updateDao( dept dept);
}
